Challenge: Web Application for Serving Guests

This lesson brings you a challenge to solve.

We'll cover the following

Problem statement#

Implement a simple web application for making a list of guests with the following interface:

  • An input text field to give the guest-name
  • A summed up list of the guest-names already entered
  • Also, make it possible to give a name through the url: /add?name=Vera
Lists of Guests
Lists of Guests

Remark: Use 0.0.0.0:3000 or simply :3000 for the connection. However, if you run it locally, use :8765

Try to attempt the challenge below. Feel free to view the solution, after giving some shots. Good Luck!

Hint: Do not forget to import fmt and html/template packages.

This code requires the following environment variables to execute:
GOROOT
/usr/local/go
GOPATH
//root/usr/local/go/src
PATH
//root/usr/local/go/src/bin:/usr/local/go/bin://root/usr/local/go/src/bin:/usr/local/go/bin://root/usr/local/go/src/bin:/usr/local/go/bin://root/usr/local/go/src/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/
main.go

We hope that you were able to solve the challenge. The next lesson brings you the solution to this challenge.

Exploring the template Package

Solution Review: Web Application for Serving Guests